//
//  CrazyChatSettingOneCell.m
//  webSocket
//
//  Created by 马军凯 on 2019/2/19.
//  Copyright © 2019年 ZH. All rights reserved.
//

#import "CrazyChatSettingOneCell.h"

@interface CrazyChatSettingOneCell ()

@property (nonatomic, strong) UIImageView *headImageView;
@property (nonatomic, strong) UILabel *shopNameLabel;
@property (nonatomic, strong) UILabel *goToShopLabel;

@end

@implementation CrazyChatSettingOneCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
//        self.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
        //头像
        self.headImageView = [[UIImageView alloc] init];
        self.headImageView.frame = CGRectMake(15, 20, 60, 60);
        [self.contentView addSubview:self.headImageView];
        //进店
        self.goToShopLabel = [[UILabel alloc] init];
        self.goToShopLabel.frame = CGRectMake(CRAZY_SCREEN_WIDTH - 115, 40, 100, 20);
        self.goToShopLabel.text = @"进入店铺";
        self.goToShopLabel.font = [UIFont systemFontOfSize:11];
        self.goToShopLabel.textAlignment = NSTextAlignmentRight;
        self.goToShopLabel.textColor = CRAZY_RGBR(60);
        [self.contentView addSubview:self.goToShopLabel];
        //店铺名称
        self.shopNameLabel = [[UILabel alloc] init];
        self.shopNameLabel.frame = CGRectMake(90, 40, CRAZY_SCREEN_WIDTH - 200, 20);
        self.shopNameLabel.textColor = CRAZY_RGBR(33);
        self.shopNameLabel.textAlignment = NSTextAlignmentLeft;
        self.shopNameLabel.font = [UIFont systemFontOfSize:14];
        [self.contentView addSubview:self.shopNameLabel];
    }
    return self;
}


- (void)setCellValueWithURL:(NSString *)url shopName:(NSString *)shopName {
    //头像
    [self.headImageView sd_setImageWithURL:[NSURL URLWithString:url] placeholderImage:CRAZY_DEFAULT_HEADIMAGE];
    //店铺名称
    self.shopNameLabel.text = shopName;
}




- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
